Skip to content

feat: add Injective Mainnet to Price API supported chains#8487

Open
jeremy-consensys wants to merge 1 commit intomainfrom
fix/injective-price-api-support
Open

feat: add Injective Mainnet to Price API supported chains#8487
jeremy-consensys wants to merge 1 commit intomainfrom
fix/injective-price-api-support

Conversation

@jeremy-consensys
Copy link
Copy Markdown
Contributor

@jeremy-consensys jeremy-consensys commented Apr 16, 2026

Explanation

Injective Mainnet (chain 0x6f0 / 1776) is missing from SPOT_PRICES_SUPPORT_INFO in assets-controllers. validateChainIdSupported('0x6f0') therefore returns false, so Extension and Mobile never call the Price API for any Injective token (native or ERC20). The wallet UI shows "no conversion rate available" for INJ and every Injective ERC20 (USDT, wETH, USDC, ATOM, TIA, stINJ).

This PR adds '0x6f0': 'eip155:1776/slip44:22000119' to SPOT_PRICES_SUPPORT_INFO — INJ's CAIP-19 asset identifier already exists in va-mmcx-price-api's slip44 map. Same one-line pattern as #7939 (Chiliz, Plasma).

The it.each(SUPPORTED_CHAIN_IDS) test at src/token-prices-service/codefi-v2.test.ts:1762 automatically covers the new entry.

The Injective EVM ERC20 contracts must also be wired up server-side in the Price API — that work lives in the companion PR (link below). Without it, this change unblocks native INJ but ERC20 prices still come back empty.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Single mapping/changelog update; risk is limited to enabling price lookups for one additional chain ID.

Overview
Enables Price API spot price lookups on Injective Mainnet by adding chain 0x6f0 (CAIP-19 eip155:1776/slip44:22000119) to SPOT_PRICES_SUPPORT_INFO in codefi-v2.ts.

Updates the @metamask/assets-controllers changelog to document the new Injective support.

Reviewed by Cursor Bugbot for commit 8330430. Bugbot is set up for automated code reviews on this repo. Configure here.

@jeremy-consensys jeremy-consensys force-pushed the fix/injective-price-api-support branch from 5ac89ad to dffc07d Compare April 16, 2026 13:24
@jeremy-consensys jeremy-consensys marked this pull request as ready for review April 17, 2026 03:05
@jeremy-consensys jeremy-consensys requested review from a team as code owners April 17, 2026 03:05
@jeremy-consensys jeremy-consensys force-pushed the fix/injective-price-api-support branch from dffc07d to b4801ee Compare April 17, 2026 03:05
Add chain 1776 (Injective Mainnet, native symbol INJ, slip44:22000119)
to SPOT_PRICES_SUPPORT_INFO so clients request spot prices for Injective
tokens from the Price API.
@jeremy-consensys jeremy-consensys force-pushed the fix/injective-price-api-support branch from b4801ee to 8330430 Compare April 20, 2026 14:15
'0x504': 'eip155:1284/slip44:1284', // Moonbeam - Native symbol: GLMR
'0x505': 'eip155:1285/slip44:1285', // Moonriver - Native symbol: MOVR
'0x531': 'eip155:1329/slip44:19000118', // Sei Mainnet - Native symbol: SEI
'0x6f0': 'eip155:1776/slip44:22000119', // Injective Mainnet - Native symbol: INJ
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess those are the identifiers for Inject the native chain and not Injective EVM. However this still seems to be the right value to input here since Price API is configured for that chain: https://price.api.cx.metamask.io/v3/spot-prices?includeMarketData=true&vsCurrency=usd&cacheOnly=true&assetIds=eip155:1776/slip44:22000119

Just wanted to point it out as it is confusing

### Added

- `MultichainAssetsController`: periodic Blockaid re-scan of stored SPL-style `token:` assets (default once per day) so tokens that become malicious after a prior scan are dropped; use constructor option `blockaidTokenRescanInterval` (ms), or `0` to disable. ([#8400](https://github.com/MetaMask/core/pull/8400))
- Added Injective Mainnet native token to Price API supported chains ([#8487](https://github.com/MetaMask/core/pull/8487))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put this line in a new ### Added section under ## [Unreleased]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants